package com.wx.md.listener;

import com.android.ddmlib.IDevice;
import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

@Component("deviceListenerService")
public class DeviceListenerService {
    private ExecutorService executor;
    public void listenADB(){
        executor = Executors.newFixedThreadPool(100);
        executor.submit(new Runnable() {
            @Override
            public void run() {
                while (true) {
                    try {
                        Thread.sleep(1500);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    String iii = RandomStringUtils.randomAlphanumeric(10);
                    refreshAdbDeviceList(iii);
                }
            }
        });
    }

    /**
     * 与adb同步设备状态
     */
    private void refreshAdbDeviceList(String iii) {


    }
}
